from django.conf.urls import patterns,  url, include

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'new$', 'fetchemApp.views.newcourse'),
    url(r'^openid/', include('django_openid_auth.urls')),
    url(r'course-(?P<course>\d+)/$', 'fetchemApp.views.index'),
    url(r'course-(?P<course>\d+)/removeTA-(?P<TA>\d+)/$', 'fetchemApp.views.removeTA'),
    url(r'course-(?P<course>\d+)/removeStudent-(?P<student>\d+)/$', 'fetchemApp.views.removeStudent'),
    url(r'course-(?P<course>\d+)/excelExport/$', 'fetchemApp.views.excelExport'),
    url(r'course-(?P<course>\d+)/deleteCourse/$', 'fetchemApp.views.deleteCourse'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/$', 'fetchemApp.views.index'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/(?P<submission>\d+)/$', 'fetchemApp.views.index'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/(?P<submission>\d+)/file/$', 'fetchemApp.views.serveFile'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/(?P<submission>\d+)/delete/$', 'fetchemApp.views.deleteAssignment'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/(?P<submission>\d+)/fetch$', 'fetchemApp.views.fetcher'),
    url(r'course-(?P<course>\d+)/assignment-(?P<assignment>\d+)/(?P<submission>\d+)/notifyAll$', 'fetchemApp.views.notifyAll'),
    url(r'^openIDlogout/$', 'django.contrib.auth.views.logout'),
    url(r'^logout/$', 'fetchemApp.views.logout'),
    url(r'^$', 'fetchemApp.views.login'),
    url(r'^admin/', include(admin.site.urls)),
    

  
    # url(r'^Fetchem/', include('Fetchem.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:

)
